﻿namespace Digitalmes.Gallery.ViewModels.Pages;

public partial class WebViewViewModel : ObservableObject
{
    private readonly AppConfig _appConfig;

    [ObservableProperty]
    private string _lineCode;

    [ObservableProperty]
    private string _opCode;

    [ObservableProperty]
    private string _serverUrl;

    public WebViewViewModel(IOptions<AppConfig> options)
    {
        _appConfig = options.Value;

        _lineCode = _appConfig.LineCode ?? "";
        _opCode = _appConfig.OpCode ?? "";
        _serverUrl = _appConfig.ServerUrl ?? "";
    }
}
